package com.example.visitor.visit;

/**
 * @author ycd0075
 * @date 2024-01-25 17:20
 */
public class NormalPersonB implements Element {

    private String name;

    public NormalPersonB(String name) {
        this.name = name;
    }

    @Override
    public void accept(Visitor visitor) {
        System.out.println("访问者访问元素B");
        System.out.println("访问者是" + visitor.getClass().getName());
        visitor.visit(this);
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
